/*********************************************************************
 * Copyright (C) 2008 by Duncan A. Buell.  All rights reserved.
 * Class to read in a data array and compute the mean and standard
 * deviation.
 *
 * @author Duncan A. Buell
 * @version 1.00 2008-12-16
**/
public class Phonebook implements IPhonebook
{
/*********************************************************************
 * Instance variables for this class.
**/
  private DLL dll;

/*********************************************************************
 * Constructor.
**/
  public Phonebook()
  {
    this.dll = new DLL();
  } // public Phonebook()

/*********************************************************************
 * Method to add a <code>Phonebook</code> entry.
 * @param record the <code>Record</code> to add.
 * @return true if the list changes, else false.
**/
  public boolean add(Record record)
  {
    return this.dll.add(record);
  } // public boolean add(Record record)

/*********************************************************************
 * Method to find if a list has a given record. 
 * @param record the <code>Record</code> to match against. 
 * @return the <code>boolean</code> answer to the question.
**/
  public boolean contains(Record record)
  {
    return this.dll.contains(record);
  } // public boolean contains(Record record)

/*********************************************************************
 * Method to remove a node with a given record value. 
 * @param record the <code>Record</code> whose node is to be removed.
 * @return the <code>boolean</code> that remove succeeded.
**/
  public boolean remove(Record record)
  {
    return this.dll.remove(record);
  } // public boolean remove(Record record)

/*********************************************************************
 * Method to <code>toString</code> a complete Phonebook.
 * @return the <code>toString</code> rep'n of the entire DLL.
**/
  public String toString()
  {
    String s = "";
    s = this.dll.toString();
    return s;
  } // public String toString()

} // public class Phonebook implements IPhonebook
